import java.util.Scanner;

public class PrimeNumbers{
	public static void main(String[] args){
		
		int limit;
		//Enter number
		System.out.print("Enter integer value larger than 1: ");
		System.out.println();
		Scanner in = new Scanner(System.in);
		limit = in.nextInt();
		//Check if entered value in correct scope
			while(limit <= 1){
				System.out.println("Entered value is 1 or less, please enter value larger than 1: ");
				Scanner in2 = new Scanner(System.in);
				limit = in2.nextInt();				
			}		
			//find prime numbers
			int[] primesArray = new int[limit];
			for(int i = 2; i <= primesArray.length; i++){				
				boolean isPrimeNumber = true;
				for(int j = 2; j < i; j++){
						if(i % j == 0){
						isPrimeNumber = false;
						break;
					}												
				}
				if(isPrimeNumber){
				
				System.out.println(i);
				}
			}
		}

}

	
					


